<?php

use Illuminate\Database\Seeder;

class RecommendPositionTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {

        $datas = [
            [
                'slug' => 'index_middle_books',
                'name' => '首页的小横幅推荐'
            ],
            [

                'slug' => 'index_title_books',
                'name' => '首页的小标题推荐'
            ],
            [

                'slug' => 'index_image_books',
                'name' => '首页的书籍推荐'
            ],
            [

                'slug' => 'novel_boy_image_books',
                'name' => '男频图片推荐'
            ],
            [

                'slug' => 'novel_boy_title_books',
                'name' => '男频的小标题推荐'
            ],
            [

                'slug' => 'novel_girl_image_books',
                'name' => '女频的图片推荐'
            ],
            [

                'slug' => 'novel_girl_title_books',
                'name' => '女频的小标题推荐'
            ],
            [

                'slug' => 'novel_boy_high_quality',
                'name' => '男频的精品推荐'
            ],
            [

                'slug' => 'novel_girl_high_quality',
                'name' => '女频的精品推荐'
            ]

        ];


        foreach ($datas as $key=>$value){

            \App\Models\RecommendPosition::firstOrCreate(
                array_merge($value,[
                    'id' => $key+1
                ])
            );
        }


    }
}
